
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>
<br>
<%!
    public String getArea(double a,double b,double c){
        if(a>0&&b>0&&c>0){
            double area=(a+b)*c/2;
            return ""+area;
        }
        else {
            return ("梯形的上底下底高"+a+""+b+""+c+"不能算啦");
        }
    }
%>
<%
    String sideA=request.getParameter("sideA");
    String sideB=request.getParameter("sideB");
    String sideC=request.getParameter("sideC");
    double a=Double.parseDouble(sideA);
    double b=Double.parseDouble(sideB);
    double c=Double.parseDouble(sideC);
%>
<br>
<%=getArea(a,b,c)%>>
